package com.cloud.pet.ops.util;

import java.util.HashMap;
import java.util.Map;


public class Data2Jsp {

	/**
	 * 
	 * @Description: 获得开始页及一页有多少条数据
	 * @param @param  map
	 * @param @return
	 * @return Map<String,Integer>
	 * @date 2015-7-17
	 */
	public static Map<String, Integer> getFristAndPageSize(int page, int rows) {
		Map<String, Integer> result = new HashMap<String, Integer>();
		int page_size = rows;
		@SuppressWarnings("unused")
		int pages = 10;
		int first_page = 1;
		if (page > 1) {
			first_page = page;
		}
		first_page = (first_page - 1) * page_size;
		pages = page_size;
		result.put("first_page", first_page);
		result.put("page_size", page_size);
		return result;
	}
}
